
#ifndef _TTG_PIPELINE_NAVIGATORNODE_
#define _TTG_PIPELINE_NAVIGATORNODE_
#include "Common/Definitions.h"

#include <vector>
#include <list>

#include "Common/Structures.h"
#include "Runtime.Low/Threads.h"
#include "BasicNode.h"

#include "BasicPort.h"
#include "Loop.h"

namespace ttg_internal
{
	namespace pipeline
	{
		//Contains information node outputs/inputs and loops.
		class NavigatorNode :public BasicNode,
							 public ttg::structures::TaggedObject<int>
		{
			private:
				std::vector<NavigatorNode *> outputs;		//all connected outputs.
				//std::vector<BasicPort *> ports;				//list of port, that were created by this node.
				//std::vector<TTGPair<Loop *, size_t>> loops;	//list of loops, that contain this node.
			protected:
				//Returns list of loops, that contain this node.
				//inline std::vector<TTGPair<Loop *, size_t>> &getLoops()
				//		{ return loops; }
				//Finds node with given name.
				//Returns node or NULL.
				NavigatorNode *find(const char *name);
			public:
				inline NavigatorNode(const char *name, bool is_serial)
					:BasicNode(name, is_serial)
				{ /*nothing*/ }
				//Returns reference to attached outputs.
				inline std::vector<NavigatorNode *> &getOutputs()
						{ return outputs; }
				//Returns list of port, that were created by this node.
				//inline std::vector<BasicPort *> &getPorts()
				//		{ return ports; }
				//Adds reference to node.
				//inline void addLoop(Loop *loop)
				//		{ loops.push_back(TTGPair<Loop *, size_t>(loop, loop->getID(this))); }
				virtual ~NavigatorNode()
						{ /*nothing*/ }
		};
	}
}

#endif
